from django.contrib.auth.models import AbstractUser
from django.db import models

# Create your models here.
class User(AbstractUser):
    mobile=models.CharField(max_length=11,unique=True,verbose_name="手机号")
    avatar=models.ImageField(max_length=100,upload_to="avatar/2021",verbose_name="头像")
    nickname=models.CharField(max_length=20,verbose_name="昵称")
    money = models.DecimalField(max_digits=9, default=0.0, decimal_places=2, verbose_name="钱包余额")
    credit = models.IntegerField(default=0, verbose_name="积分")

    class Meta:
        db_table="fg_user"
        verbose_name="用户表"
        verbose_name_plural=verbose_name

